#ifndef _FILEWRITEIMPL_H_
#define _FILEWRITEIMPL_H_

#include "stdafx.h"
#include <io/iasynio.h>

#include "ioimpl/file.h"

class CFileWriteImpl :	public	IWriteFile,
						public	CUnknownImp

{
public:
	CFileWriteImpl(void);
	virtual ~CFileWriteImpl(void);
	UNKNOWN_IMP1(IWriteFile);
	//////////////////////////////////////////////////////////////////////////
	std_method(LoadFile)(const TCHAR* pszLoadFile,
		unsigned long ulwDesiredAccess,
		unsigned long ulShareMode,
		unsigned long ulCreationDisposition,
		unsigned long ulFlagsAndAttributes);
	std_method(CloseFile)();
	std_method_(os_int64, GetFileSize)();
	std_method(WriteBuffer)(char* szBuffer, os_int64 ulWriteSize);
	std_method(AsynWriteBuffer)(char* szBuffer, os_int64 ulWriteSize);
private:
	os_fd_t		m_hFile;
	FileImpl	m_FileOpt;
};

#endif